@extends('layout.admin')

@section('title')
<title>分类添加</title>
@endsection
@section('content')
@if(count($errors)>0)
<div class="alert alert-danger">
	出错啦哦!!!
	@foreach($errors->all() as $error)
	<button type="button" class="close" data-dismiss="alert">×</button>
	<strong>{{$error}}</strong>
	@endforeach
</div>
@endif
  <div class="row"> 
   <div class="col-lg-12">

    <div class="panel"> 

     <div class="panel-heading bk-bg-primary"> 
      <h6><i class="fa fa-table red"></i><span class="break">分类添加</span></h6> 
      <div class="panel-actions"> 
       <a class="btn-setting" href="#"><i class="fa fa-rotate-right"></i></a> 
       <a class="btn-minimize" href="#"><i class="fa fa-chevron-down"></i></a> 
       <!-- <a class="btn-close" href="#"><i class="fa fa-times"></i></a>  -->
      </div> 
     </div>
     <div class="panel-body"> 
     <form action="/cate" method="post" class="mws-form" enctype="multipart/form-data">
     <div class=""> 
		<div class="mws-form-inline">
		<label for="select" class="mws-form-label control-label"><h5>分类名称</h5></label>
			<div class="mws-form-row">
			<input type="text" class="form-control" name="name" value="{{old('name')}}">
			</div>
		</div>
	  </div>
      <div class="" style="margin-top:20px"> 
		<div class="mws-form-inline">
		<label for="select" class="mws-form-label control-label"><h5>父级分类</h5></label>
			<div class="mws-form-row">
				<select name="pid" size="1" class="form-control" name="select" id="select">
					<option value="0">请选择</option>
					@foreach($cates as $k=>$v)
					<option value="{{$v['id']}}">{{$v['name']}}</option>
					@endforeach
				</select>
			</div>
		</div>	
      </div>
	  <div class="form-group" style="margin-top:100px">
		 <label class="col-md-3 control-label"></label>
			<div class="col-md-6 col-xs-11 lock">
			{{csrf_field()}}
				<button class="btn  btn-info" type="submit">添加</button>
				<button class="btn  btn-danger" type="submit">重置</button>
			</div>
		</div> 
     </form> 
     </div>
    </div> 
   </div> 
  </div>
  <style>
	.lock{
		padding-left:200px;
	}
  </style>
@endsection